import React, { Component } from 'react'

export default class User extends Component {
  render() {
    let {userInfo, setInfo} = this.props
    return (
      <div>
        <div>我是子组件-user</div>
        <div>姓名：{userInfo.name}</div>
        <div>年龄：{userInfo.age}</div>
        <button onClick={()=>setInfo({name: 'Tony', age: 69})}>修改信息</button>
      </div>
    )
  }
}
